package com.xbongbong.saas.enums.dictionary;

import com.xbongbong.paas.enums.PlatFormEnum;
import com.xbongbong.pro.enums.permission.enums.ProPermissionAliasEnum;
import com.xbongbong.saas.enums.RedundantTemplateTypeEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;




/**
 * @author jiyonghui
 * @className EnableButtonEnum
 * @description
 * @date 2020/1/6   20:21
 */
@Getter
public enum EnableButtonEnum {
    //合同订单关闭启用
    CONTRACT_ENABLE(RedundantTemplateTypeEnum.CONTRACT.getCode(), "contract", "启用合同", "set", XbbRefTypeEnum.CONTRACT.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_ENABLE.getAlias()),
    CONTRACT_UNABLE(RedundantTemplateTypeEnum.CONTRACT.getCode(), "contract", "关闭合同", "set", XbbRefTypeEnum.CONTRACT.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.CONTRACT_UNABLE.getAlias()),
    //采购合同关闭启用
    PURCHASE_ENABLE(RedundantTemplateTypeEnum.PURCHASE.getCode(), "purchase", "启用采购合同", "set", XbbRefTypeEnum.PURCHASE.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_ENABLE.getAlias()),
    PURCHASE_UNABLE(RedundantTemplateTypeEnum.PURCHASE.getCode(), "purchase", "关闭采购合同", "set", XbbRefTypeEnum.PURCHASE.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.PURCHASE_UNABLE.getAlias()),
    //退货退款关闭启用
    REFUND_ENABLE(RedundantTemplateTypeEnum.REFUND.getCode(), "refund", "启用退货退款", "set", XbbRefTypeEnum.REFUND.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_ENABLE.getAlias()),
    REFUND_UNABLE(RedundantTemplateTypeEnum.REFUND.getCode(), "refund", "关闭退货退款", "set", XbbRefTypeEnum.REFUND.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.REFUND_UNABLE.getAlias()),
    //采购退货关闭启用
    RETURN_PURCHASE_ENABLE(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), "returnPurchase", "启用采购退货", "set", XbbRefTypeEnum.RETURNED_PURCHASE.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_PURCHASE_ENABLE.getAlias()),
    RETURN_PURCHASE_UNABLE(RedundantTemplateTypeEnum.RETURNED_PURCHASE.getCode(), "returnPurchase", "关闭采购退货", "set", XbbRefTypeEnum.RETURNED_PURCHASE.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.RETURN_PURCHASE_UNABLE.getAlias()),
    //调拨单启用关闭
    TRANSFER_ENBALE(RedundantTemplateTypeEnum.TRANSFER.getCode(), "transfer", "启用调拨单", "set", XbbRefTypeEnum.TRANSFER.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.TRANSFER_ENABLE.getAlias()),
    TRANSFER_UNBALE(RedundantTemplateTypeEnum.TRANSFER.getCode(), "transfer", "关闭调拨单", "set", XbbRefTypeEnum.TRANSFER.getCode(), PlatFormEnum.ALL, ProPermissionAliasEnum.TRANSFER_UNABLE.getAlias()),
    //订货单启用关闭
    ORDER_ENABLE(RedundantTemplateTypeEnum.ORDER.getCode(),"order","启用订货单","set", XbbRefTypeEnum.ORDER.getCode(), PlatFormEnum.ALL,ProPermissionAliasEnum.ORDER_ENABLE.getAlias()),
    ORDER_UNABLE(RedundantTemplateTypeEnum.ORDER.getCode(),"order","关闭订货单","set", XbbRefTypeEnum.ORDER.getCode(), PlatFormEnum.ALL,ProPermissionAliasEnum.ORDER_CLOSE.getAlias()),
    // 退货单关闭
    RETURN_UNABLE(RedundantTemplateTypeEnum.RETURN.getCode(),"return","关闭退货单","set",XbbRefTypeEnum.RETURN.getCode(),PlatFormEnum.ALL,ProPermissionAliasEnum.RETURN_CLOSE.getAlias()),
    ;

    private Integer fromBusinessType;
    private String attr;
    private String value;
    private String btnType;
    private Integer businessType;
    private PlatFormEnum platform;
    private String permission;

    EnableButtonEnum(Integer fromBusinessType, String attr, String value, String btnType, Integer businessType, PlatFormEnum platform, String permission) {
        this.fromBusinessType = fromBusinessType;
        this.attr = attr;
        this.value = value;
        this.btnType = btnType;
        this.businessType = businessType;
        this.platform = platform;
        this.permission = permission;
    }

}
